<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>Quick Test</title>
    <script type="text/javascript" src="../js/inputex-loader.js"></script>
    <script type="text/javascript" src="../lib/tabifier/tabifier.js"></script>
</head>
<body class="yui-skin-sam">
<div id="parent">
    <div id="test"></div>
</div>
<textarea id="result" rows="30" cols="120"></textarea>

<script type="text/javascript">
    var form;
    inputEx.YUI({base:'../lib/yui3/',inputExBase:'../'}).use('accordionform', 'stringfield', 'urlfield', 'emailfield', 'checkbox', 'selectfield', function(Y) { // 'json' is required for the stringify on this method
        try {
            Y.log('quick test begin')
            //Y.inputEx.spacerUrl = "../images/space.gif";

           form = new Y.inputEx.AccordionForm({
               method:'get', action:'/test',
                fields: [
                    {type:'group',inputParams:{legend:'group 1',name:'group1',fields:[
                        {type: 'select', inputParams: {label: 'Title', name: 'title', selectValues: ['Mr','Mrs','Mme'] } },
                        {inputParams: {label: 'Firstname', name: 'firstname', required: true, value:'Jacques' } },
                        {inputParams: {label: 'Lastname', name: 'lastname', value:'Dupont' } }
                    ]}},
                    { type:'group',inputParams:{legend:'group 2',name:'group2',fields:[
                        {type:'email', inputParams: {label: 'Email', name: 'email'}},
                        {type:'url', inputParams: {label: 'Website',name:'website'}}
                    ]}}
                ],
                buttons: [{type: 'submit', value: 'Change'}]
            });
            form.render('#test')


            var testHTML = Y.Node.get('#parent').get('innerHTML')
            Y.Node.get('#result').set('innerHTML', Y.inputEx.escapeHTML(testHTML))
            runTabifier('result', 'result', 'HTML')
            Y.log('quick test end')

        } catch(e) {
            Y.log(e, 'error', 'inputEx');
        }
    });
</script>

<div style="position:absolute; right:0; top:0; margin:10px">
    <a href="javascript:alert(form.getInputEl('email').get('value'));">email.value</a>
</div>
</body>
</html>